package com.neulogistics.contrib.warehouse.api.application.command;

import com.blackto.lib.mediat.unicast.IRequest;
import com.neulogistics.infrastructure.common.serviceresult.BaseResponse;
import lombok.Data;

import javax.validation.constraints.*;
import java.io.Serializable;

@Data
public class PurchaseCommand implements IRequest<BaseResponse<Boolean>>, Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 库房id
     */
    @NotNull
    @Positive
    public Integer warehouseId;

    /**
     * 商品id
     */
    @NotNull
    @Positive
    public Integer goodsId;

    /**
     * 商品名
     */
    @NotBlank
    @Size(max = 20)
    public String goodsName;

    /**
     * 进货数量
     */
    @NotNull
    @Max(99999)
    public Integer count;

    /**
     * 计量单位
     */
    @NotBlank
    public String measureUnit;
}
